# $Id: PKGBUILD 65493 2012-02-21 06:37:08Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Olivier Médoc <o_medoc@yahoo.fr>
# Contributor: Guillermo A. Amaral <me@guillermoamaral.com> (thewonka)
# Maintainer: Guillermo A. Amaral <me@guillermoamaral.com> (thewonka)

pkgname=qtorrent
pkgver=0.9.5
pkgrel=7
pkgdesc="A Bittorrent Qt GUI"
arch=('any')
url="http://thegraveyard.org/qtorrent.php"
license=("MIT")
depends=('pyqt3')
makedepends=('bash' 'patch' 'python2')
source=(http://thegraveyard.org/files/$pkgname-$pkgver.tar.bz2
	torrentsettings.patch
	torrentwindow.patch
	torrentmain.patch)
md5sums=('5249c19a5d1bfec48bfb3f983a73818a'
         '30d1accdd81040970dfa7c345af0eeb8'
         '3e2ce3cadf23ae6b215873c283ed8220'
         'b6702b99fac4cb7c95ab3c07b0b5d373')

build() {

  cd $srcdir/${pkgname}-${pkgver}/pyqtorrent/

  patch -Np0 -i $srcdir/torrentsettings.patch
  patch -Np0 -i $srcdir/torrentwindow.patch
  patch -Np2 -i $srcdir/torrentmain.patch

  cd $srcdir/${pkgname}-${pkgver}/

  python2 setup.py install --root=$pkgdir
  install -D -m644 LICENSE.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE.txt
}
